use dataset_with_independents, clear

ssc install estout, replace

collapse ft_dist polar_dif, by(year)
sum year
gen time = (year-r(min))/(r(max)-r(min))
orthpoly time, generate(time1 time2) degree(2)

eststo clear
eststo: reg polar_dif time1 time2

use dataset, clear
collapse ft_dist polar_dif, by(year)
sum year
gen time = (year-r(min))/(r(max)-r(min))
orthpoly time, generate(time1 time2) degree(2)

eststo: reg ft_dist time1 time2
eststo: reg polar_dif time1 time2

esttab, se stats(r2_a N)
